home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / pcl / src-16f.lha / compiler / foo-trans.lisp < prev    next >
Encoding:
Text File  |  1991-11-06  |  874 b   |  26 lines

  1. ;;; Write-Line and Write-String take keyword args, but people call them who
  2. ;;; don't want to cons.  So we turn them into calls to non-keyword parsing
  3. ;;; functions.
  4.  
  5. (deftransform write-string write-string-transform
  6.   (string &optional (stream '*standard-output*)
  7.       &key (start) (end))
  8.   (if start
  9.       (if end
  10.       `(lisp::write-string* ,string ,stream ,start ,end)
  11.       `(lisp::write-string* ,string ,stream ,start))
  12.       (if end
  13.       `(lisp::write-string* ,string ,stream 0 ,end)
  14.       `(lisp::write-string* ,string ,stream))))
  15.  
  16. (deftransform write-line write-line-transform
  17.   (string &optional (stream '*standard-output*)
  18.       &key (start) (end))
  19.   (if start
  20.       (if end
  21.       `(lisp::write-line* ,string ,stream ,start ,end)
  22.       `(lisp::write-line* ,string ,stream ,start))
  23.       (if end
  24.       `(lisp::write-line* ,string ,stream 0 ,end)
  25.       `(lisp::write-line* ,string ,stream))))
  26.